<?php 
class fenquClassAction extends Action
{
	public function dataAction()
	{
		$where = '1=1';
		if($this->adminrs['type']=='0')$where='`uid`='.$this->adminid.'';
		$sort  = $this->get('sort');
		$dir   = $this->get('dir');
		$order = '`sort` asc';
		if($sort && $dir)$order = '`'.$sort.'` '.$dir.'';
		$rows = m('worc')->getall($where,'*', $order);
		return array(
			'success' => true,
			'rows' => $rows
		);
	}
}